<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no" />
    <title>搜索详情</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/toastr.min.css"/>
    <link rel="stylesheet" type="text/css" href="../css/common.css" />
    <style>
        /*//头部*/
        body{
            font-size: 14px;
        }
        .headUl{
            font-size: 14px;
        }
        .headUl li{
            width: 20%;
            color: #000;
        }
        .headUl li span{
            font-size: 14px;
        }
        .headUl li.active span{
            display: inline-block;
            position: relative;
        }
        .headUl li.active span:before{
            content: "";
            width: 100%;
            bottom: 0;
            height: 2px;
            left: 0;
            position: absolute;
            background: #ff3333;
        }
        .headUl {
            width: 100%;
            display: box;
            display: -webkit-box;
            box-sizing: border-box;
            font-size: 16px;
            height: 45px;
            background-color: #fff;
            /*overflow: hidden;*/
        }
        .iConent:before {
            content: "\e700" !important;
        }
        .aui-bar .aui-title{
            right: 45px;
            left: 45px;
        }
        .aui-searchbar-wrap{
            background:none;
        }
        .aui-searchbar{
            background:#ebeced !important;
        }
        .aui-bar .aui-iconfont{
            color: #c8c7cc;
        }

        .bigPic .divPrice {
            color: #ec2e2e;
            font-weight: bold;
            text-align: left;
            padding-left: 10px !important;
            font-size: 14px;
        }
        .bigPic .divBuy {
            text-align: right;
            padding-right: 10px !important;
            color: #4c4c4c;
            /*font-weight: bold;*/
            font-size: 12px;
            float: right !important;
        }
        .bigPic .divPrice, .divBuy {
            padding: 5px;
            overflow: hidden;
        }
        .bigPic .w50 {
            width: 50%;
            float: left;
        }
        .aui-ellipsis-2 {
            display: -webkit-box;
            overflow: hidden;
            text-overflow: ellipsis;
            word-wrap: break-word;
            white-space: normal !important;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }
        .aui-list-view-cell {
            border-radius: 2px;
        }
        .proInfo .aui-img-body{
            height:52px;
        }
        /*//一行两列样式*//**/
        .bigPic.aui-list-view.aui-grid-view {
            padding: 0 !important;
            background: #f3f3f3;
        }
        .bigPic.aui-list-view.aui-grid-view .aui-list-view-cell {
            padding: 0 !important;
        }
        .bigPic .aui-col-xs-6:nth-of-type(2n+1) {
            margin-right: 1%;
        }
        .bigPic.aui-list-view.aui-grid-view .aui-list-view-cell .aui-img-body {
            margin: 0 0 0 5px;
            margin-bottom: 1px;
            text-align: left;
        }
        .bigPic li {
            background: #fff !important;
            margin-bottom: 8px;
        }
        .bigPic .aui-col-xs-6 {
            width: 49.5%;
        }
        .bigPic .line {
            width: 90%;
            margin-left: 5%;
        }
        /*一行一列样式*/
        .smallPic .proPic {
            width: 100%;
        }
        .smallPic .divPrice {
            color: #ec2e2e;
            font-weight: bold;
            text-align: left;
            padding-left: 10px !important;
            font-size: 14px;
        }
        .smallPic .divBuy {
            text-align: right;
            padding-right: 10px !important;
            color: #9c9c9c;
            /*font-weight: bold;*/
            font-size: 12px;
            float: right !important;
        }
        .smallPic .divPrice {
            padding: 5px;
            /*padding-top:0px;*/
            overflow: hidden;
            position: absolute;
            bottom: 8px;
        }
        .smallPic .divBuy {
            padding: 5px;
            padding-left: 9px;
            overflow: hidden;
            position: absolute;
            bottom: 30px;
        }
        .smallPic .w50 {
            width: 100%;
            /*float: left;*/
            text-align: left !important;
            line-height: 1;
        }
        .smallPic.aui-list-view.aui-grid-view {
            padding: 0 !important;
            background: #f3f3f3;
        }
        .smallPic.aui-list-view.aui-grid-view .aui-list-view-cell {
            padding: 0 !important;
            padding: 8px !important;
        }
        .smallPic .proPic {
            width: 30%;
            float: left;
        }
        .smallPic .proInfo {
            width: 70%;
            float: left;
        }
        .smallPic .aui-border-b:after {
            border: none;
        }
        .smallPic .aui-col-xs-6:nth-of-type(2n+1) {
            margin-right: 0%;
        }
        .smallPic.aui-list-view.aui-grid-view .aui-list-view-cell .aui-img-body {
            margin: 0px 10px 0 10px;
            text-align: left;
        }
        .smallPic li {
            background: #fff !important;
            margin-bottom: 10px;
        }
        .smallPic .aui-col-xs-6 {
            width: 100%;
        }
        .contain {
            padding: 10px 0 0 0;
        }
        .mui-backdrop {
            position: fixed;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            z-index: 998;
            background-color: rgba(0,0,0,.3);
        }
        .aui-searchbar-wrap{
            height: 48px;
        }

    </style>
</head>
<body>
<header class="aui-bar aui-bar-nav">
    <div class="aui-pull-left aui-iconfont aui-icon-left icon-left-coler" tapmode onclick="closeWin()"></div>
    <div class=" header1  hidde aui-border-b " id="header-title">
        <div class="aui-title">
            <div class="aui-searchbar-wrap demo" id="search">
                <div class="aui-searchbar aui-border-radius" tapmode onclick="openToTwo('search')">
                    <i class="aui-iconfont aui-icon-search"></i>
                    <div class="aui-searchbar-text">搜索你想要的商品名称</div>
                    <div class="aui-searchbar-input">
                        <form action="javascript:search();">
                            <input type="search" placeholder="搜索你想要的商品名称" id="search-input">
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <ul class="headUl aui-border-t aui-border-b">
        <li class="active" data-type="1" tapmode onclick="switchChange(this)">
            <span> 综合</span>
        </li>
        <li data-type="2" tapmode onclick="switchChange(this)">
            <span>新品</span>
        </li>
        <li data-type="3" tapmode onclick="switchChange(this)">
            <span>销量</span>
        </li>
        <li data-type="4" tapmode onclick="switchChange(this)">
            <span>价格</span>
        </li>
        <li tapmode onclick="changeView(this)" view-type="bigPic">
            <i class="aui-iconfont aui-icon-cascades icon-left-coler"></i>
        </li>
    </ul>
</header>

<div class="aui-content-padded contain gongchang">
    <div class="prolist">
        <div id="scroller-pullDown">
                <span class="aui-iconfont aui-icon-refresharrow downIcon">
                </span>
            <span id="pullDown-msg" class="pull-down-msg ">下拉刷新</span>
        </div>
        <ul class="aui-list-view aui-grid-view bigPic">
            <li class="aui-list-view-cell aui-img aui-col-xs-6">
                <div class="proPic"><img class="aui-img-object" src="../image/pro.png">
                </div>
                <div class="proInfo">
                    <div class="aui-img-body  aui-ellipsis-2">
                        图文列表图
                    </div>
                    <div class="aui-border-b line"></div>
                    <div class="divBuy  zfhuise">
                        成交<span class="num">5550</span>笔
                    </div>
                    <div class="divPrice  zfBlue">
                        ￥<span class="price ">55.0</span>
                    </div>
                </div>
            </li>
            <li class="aui-list-view-cell aui-img aui-col-xs-6">
                <div class="proPic"><img class="aui-img-object" src="../image/pro.png">
                </div>
                <div class="proInfo">
                    <div class="aui-img-body  aui-ellipsis-2">
                        图文列表图文列表图文列表图文列表
                    </div>
                    <div class="aui-border-b line"></div>
                    <div class="divBuy  zfhuise">
                        成交<span class="num">5550</span>笔
                    </div>
                    <div class="divPrice  zfBlue">
                        ￥<span class="price ">55.0</span>
                    </div>
                </div>
            </li>
            <li class="aui-list-view-cell aui-img aui-col-xs-6">
                <div class="proPic"><img class="aui-img-object" src="../image/pro.png">
                </div>
                <div class="proInfo">
                    <div class="aui-img-body  aui-ellipsis-2">
                        图文列表图文列表图文列表图文列表
                    </div>
                    <div class="aui-border-b line"></div>
                    <div class="divBuy  zfhuise">
                        成交<span class="num">555000000</span>笔
                    </div>
                    <div class="divPrice  zfBlue">
                        ￥<span class="price ">55.0</span>
                    </div>
                </div>
            </li>
            <li class="aui-list-view-cell aui-img aui-col-xs-6">
                <div class="proPic"><img class="aui-img-object" src="../image/pro.png">
                </div>
                <div class="proInfo">
                    <div class="aui-img-body  aui-ellipsis-2">
                        图文列表图
                    </div>
                    <div class="aui-border-b line"></div>
                    <div class="divBuy  zfhuise">
                        成交<span class="num">5550</span>笔
                    </div>
                    <div class="divPrice  zfBlue">
                        ￥<span class="price ">55.0</span>
                    </div>
                </div>
            </li>
            <li class="aui-list-view-cell aui-img aui-col-xs-6">
                <div class="proPic"><img class="aui-img-object" src="../image/pro.png">
                </div>
                <div class="proInfo">
                    <div class="aui-img-body  aui-ellipsis-2">
                        图文列表图文列表图文列表图文列表
                    </div>
                    <div class="aui-border-b line"></div>
                    <div class="divBuy  zfhuise">
                        成交<span class="num">5550</span>笔
                    </div>
                    <div class="divPrice  zfBlue">
                        ￥<span class="price ">55.0</span>
                    </div>
                </div>
            </li>
            <li class="aui-list-view-cell aui-img aui-col-xs-6">
                <div class="proPic"><img class="aui-img-object" src="../image/pro.png">
                </div>
                <div class="proInfo">
                    <div class="aui-img-body  aui-ellipsis-2">
                        图文列表图文列表图文列表图文列表
                    </div>
                    <div class="aui-border-b line"></div>
                    <div class="divBuy  zfhuise">
                        成交<span class="num">555000000</span>笔
                    </div>
                    <div class="divPrice  zfBlue">
                        ￥<span class="price ">55.0</span>
                    </div>
                </div>
            </li>
            <li class="aui-list-view-cell aui-img aui-col-xs-6">
                <div class="proPic"><img class="aui-img-object" src="../image/pro.png">
                </div>
                <div class="proInfo">
                    <div class="aui-img-body  aui-ellipsis-2">
                        图文列表图
                    </div>
                    <div class="aui-border-b line"></div>
                    <div class="divBuy  zfhuise">
                        成交<span class="num">5550</span>笔
                    </div>
                    <div class="divPrice  zfBlue">
                        ￥<span class="price ">55.0</span>
                    </div>
                </div>
            </li>
            <li class="aui-list-view-cell aui-img aui-col-xs-6">
                <div class="proPic"><img class="aui-img-object" src="../image/pro.png">
                </div>
                <div class="proInfo">
                    <div class="aui-img-body  aui-ellipsis-2">
                        图文列表图文列表图文列表图文列表
                    </div>
                    <div class="aui-border-b line"></div>
                    <div class="divBuy  zfhuise">
                        成交<span class="num">5550</span>笔
                    </div>
                    <div class="divPrice  zfBlue">
                        ￥<span class="price ">55.0</span>
                    </div>
                </div>
            </li>
            <li class="aui-list-view-cell aui-img aui-col-xs-6">
                <div class="proPic"><img class="aui-img-object" src="../image/pro.png">
                </div>
                <div class="proInfo">
                    <div class="aui-img-body  aui-ellipsis-2">
                        图文列表图文列表图文列表图文列表
                    </div>
                    <div class="aui-border-b line"></div>
                    <div class="divBuy  zfhuise">
                        成交<span class="num">555000000</span>笔
                    </div>
                    <div class="divPrice  zfBlue">
                        ￥<span class="price ">55.0</span>
                    </div>
                </div>
            </li>
            <li class="aui-list-view-cell aui-img aui-col-xs-6">
                <div class="proPic"><img class="aui-img-object" src="../image/pro.png">
                </div>
                <div class="proInfo">
                    <div class="aui-img-body  aui-ellipsis-2">
                        图文列表图
                    </div>
                    <div class="aui-border-b line"></div>
                    <div class="divBuy  zfhuise">
                        成交<span class="num">5550</span>笔
                    </div>
                    <div class="divPrice  zfBlue">
                        ￥<span class="price ">55.0</span>
                    </div>
                </div>
            </li>
            <li class="aui-list-view-cell aui-img aui-col-xs-6">
                <div class="proPic"><img class="aui-img-object" src="../image/pro.png">
                </div>
                <div class="proInfo">
                    <div class="aui-img-body  aui-ellipsis-2">
                        图文列表图文列表图文列表图文列表
                    </div>
                    <div class="aui-border-b line"></div>
                    <div class="divBuy  zfhuise">
                        成交<span class="num">5550</span>笔
                    </div>
                    <div class="divPrice  zfBlue">
                        ￥<span class="price ">55.0</span>
                    </div>
                </div>
            </li>
            <li class="aui-list-view-cell aui-img aui-col-xs-6">
                <div class="proPic"><img class="aui-img-object" src="../image/pro.png">
                </div>
                <div class="proInfo">
                    <div class="aui-img-body  aui-ellipsis-2">
                        图文列表图文列表图文列表图文列表
                    </div>
                    <div class="aui-border-b line"></div>
                    <div class="divBuy  zfhuise">
                        成交<span class="num">555000000</span>笔
                    </div>
                    <div class="divPrice  zfBlue">
                        ￥<span class="price ">55.0</span>
                    </div>
                </div>
            </li>
            <li class="aui-list-view-cell aui-img aui-col-xs-6">
                <div class="proPic"><img class="aui-img-object" src="../image/pro.png">
                </div>
                <div class="proInfo">
                    <div class="aui-img-body  aui-ellipsis-2">
                        图文列表图
                    </div>
                    <div class="aui-border-b line"></div>
                    <div class="divBuy  zfhuise">
                        成交<span class="num">5550</span>笔
                    </div>
                    <div class="divPrice  zfBlue">
                        ￥<span class="price ">55.0</span>
                    </div>
                </div>
            </li>
            <li class="aui-list-view-cell aui-img aui-col-xs-6">
                <div class="proPic"><img class="aui-img-object" src="../image/pro.png">
                </div>
                <div class="proInfo">
                    <div class="aui-img-body  aui-ellipsis-2">
                        图文列表图文列表图文列表图文列表
                    </div>
                    <div class="aui-border-b line"></div>
                    <div class="divBuy  zfhuise">
                        成交<span class="num">5550</span>笔
                    </div>
                    <div class="divPrice  zfBlue">
                        ￥<span class="price ">55.0</span>
                    </div>
                </div>
            </li>
            <li class="aui-list-view-cell aui-img aui-col-xs-6">
                <div class="proPic"><img class="aui-img-object" src="../image/pro.png">
                </div>
                <div class="proInfo">
                    <div class="aui-img-body  aui-ellipsis-2">
                        图文列表图文列表图文列表图文列表
                    </div>
                    <div class="aui-border-b line"></div>
                    <div class="divBuy  zfhuise">
                        成交<span class="num">555000000</span>笔
                    </div>
                    <div class="divPrice  zfBlue">
                        ￥<span class="price ">55.0</span>
                    </div>
                </div>
            </li>
        </ul>
        <div id="scroller-pullUp">
            <i class="aui-iconfont aui-icon-refresharrow upIcon"></i>
            <span id="pullUp-msg" class="pull-up-msg"> 上拉刷新</span>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/iscroll2.js"></script>
<script type="text/javascript" src="../script/jquery-1.11.3.js"></script>
<script type="text/javascript" src="../script/toastr.js"></script>
<script type="text/javascript">
    $(function () {
//        垂直滚动
        scrollV();
    })
    //    垂直滚动
    //下拉刷新
    function scrollV() {
        $(".contain").height($("body").height()-$("header").innerHeight()-10);
        myScrollV=new IScroll(".contain",{
            probeType:3,
            click:true
        })

        if(myScrollV.maxScrollY<0){
            $("#scroller-pullUp").css({"display":"block"})
        }
        var upIcon = $(".downIcon"),
            downIcon = $(".upIcon");
        myScrollV.on("scroll",function(){
            var y = this.y,
                maxY = this.maxScrollY - y,
                downHasClass = downIcon.hasClass("reverse_icon"),
                upHasClass = upIcon.hasClass("reverse_icon");
            if(y >= 40 && !downHasClass){
                $(".downIcon").addClass("turnUp");
                downIcon.addClass("reverse_icon");
                $(".pull-down-msg").text("松手刷新");
                return "";
            }else if(y < 5 && downHasClass){
                $(".downIcon").removeClass("turnUp");
                downIcon.removeClass("reverse_icon");
                $(".pull-down-msg").text("下拉刷新");
                return "";
            }

            if(maxY >= 40 && !upHasClass){
                $(".upIcon").addClass("turnDown");
                upIcon.addClass("reverse_icon");
                $(".pull-up-msg").text("松手刷新");
                return "";
            }else if(maxY < 5 && upHasClass){
                $(".upIcon").removeClass("turnDown");
                upIcon.removeClass("reverse_icon");
                $(".pull-up-msg").text("上拉刷新");
                return "";
            }
        });

        myScrollV.on("slideDown",function(){
            //下拉刷新
            if(this.y > 40){
                //添加数据

                myScrollV.refresh();
                toastr.success("下拉数据加载成功");
            }
        });

        myScrollV.on("slideUp",function(){
            //上拉刷新
            if(this.maxScrollY - this.y > 40){
                //添加数据
                myScrollV.refresh();
                toastr.success("上拉数据加载成功");
            }
        });

    }

    function switchChange(obj){
        // 改变选择状态
        changeCheck(obj);
        var dataID=$(obj).attr("data-id");
        if(dataID){
            $('#List-content').empty();
            getData(dataID);
        }
    }
    //为了在下面的热门类别可以通用，单独出来
    function changeCheck(obj){
        $(obj).parent().find("li").removeClass("active");
        $(obj).addClass("active");
    }
    function changeView(obj) {
        var viewType = $(obj).attr("view-type");

        if (viewType == "bigPic") {
            //一行两列
            $(".contain").find("." + viewType).addClass("smallPic");
            $(".contain").find("." + viewType).removeClass(viewType);
            $(".aui-icon-cascades").addClass("iConent");;
            $(obj).attr("view-type", "smallPic");
        } else if (viewType == "smallPic") {
            //一行一列
            $(".aui-icon-cascades").removeClass("iConent");
            $(".contain").find("." + viewType).addClass("bigPic");
            $(".contain").find("." + viewType).removeClass(viewType);
            $(obj).attr("view-type", "bigPic");
        }

    //        if (viewType == "bigPic") {
    //            //一行两列
    //            $(".aui-icon-cascades").addClass("iConent")
    //        } else if (viewType == "smallPic") {
    //            //一行一列
    //            $(".aui-icon-cascades").removeClass("iConent");
    //        }
    }
</script>
</html>
